# -*- coding: utf-8 -*-

"""
@author: l
@Remark: 	
	
厂商表管理
"""
from app.device.models import Department
from dvadmin.utils.serializers import CustomModelSerializer
from dvadmin.utils.viewset import CustomModelViewSet


class DepartmentSerializer(CustomModelSerializer):
    """
    序列化器
    """

    class Meta:
        model = Department
        fields = "__all__"
        read_only_fields = ["id"]


class DepartmentViewSet(CustomModelViewSet):
    """
    	
    厂商表接口
    list:厂商表查询
    create:厂商表新增
    update:厂商表修改
    retrieve:厂商表单例
    destroy:厂商表删除
    multiple_delete:厂商表多删
    """
    queryset = Department.objects.all()
    serializer_class = DepartmentSerializer
    # filter_fields = ['creator_id']

    # permission_classes = []
